
#include <iostream>
#include <cstdlib>
#include "Environment.h"
#include "Creator.h"
#include "Ant.h"
#include "Food.h"
#include "Anthill.h"
#include "Vis.h"

int errorHdl(int nRet)
{
	return nRet;
}


int main(int argc, const char * argv[])
{
    int nRet; //to handle all return values

	// create/give me an Environment
    Environment* pEnv = Environment::getInstance(20,20);

	//init anthill and foodsource
	nRet = pEnv->init_Env(1,5,100);
	if(nRet != 0) return errorHdl(nRet);
	
	// start vis
	System::Windows::Forms::Application::Run(gcnew Vis());
	/*
    // print Environment;
    if(pEnv != NULL) {
        //pEnv->PrintEnvironment();
		pEnv->jPrintEnvironment();
    }


	//ActAll.....
	for(int i=0;i<200;++i)
	{
		system("cls");
		std::cout<<std::endl<<"actAll() "<<i+1<<std::endl;
		pEnv->act();
		pEnv->jPrintEnvironment();

		//for(int i=0;i<50000000;++i){}
		 
		//getchar();
	}
   

	getchar();
	*/
    return 0;
}

